package com.example.administrator.guosaicheku_13;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.example.administrator.guosaicheku_13.util.savechewei;

public class setting extends AppCompatActivity {
    private EditText num;
    private Button button;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        button=findViewById(R.id.save);
        num=findViewById(R.id.et_num);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                savechewei.save(num.getText().toString().trim(),setting.this);
                Intent intent = new Intent(setting.this, MainActivity.class);
                startActivity(intent);
            }
        });
    }
}
